<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>网站管理系统</title>
		<link rel="stylesheet" href="/static/js/kindeditor/themes/default/default.css" />
		<link rel="stylesheet" href="/static/admin/site.css?rand={:time()}" />
		<script src="/static/js/jquery.min.js"></script>
	</head>
	<body>
		 
		{__CONTENT__}
	 
		<script src="/static/js/jscolor.min.js"></script>
		<script src="/static/js/jquery.cookie.min.js"></script>
		<script src="/static/js/layer/layer.js"></script>
		<script src="/static/js/laydate/laydate.js"></script>
		<script src="/static/js/jquery.form.min.js"></script>
		<script src="/static/js/validator/jquery.validator.min.js?local=zh-CN"></script>
		<script src="/static/js/kindeditor/kindeditor-all-min.js"></script>
		<script>
			$(function() {
			 
				$(".form-search .form-action span").click(function(e) {
					e.preventDefault();
					var obj = $(this).parent().parent();
					if (obj.hasClass('open')) {
						obj.removeClass('open');
					} else {
						obj.addClass('open');
					}
				})
				
				$(".ajax").on('click', function(e) {
					e.preventDefault();
					var obj = $(this);
					info = obj.attr('title') ? obj.attr('title') : obj.text();
					layer.confirm('确认执行' + info + "操作吗？", {
							title: '提示',
							btn: ['确定', '取消']
						},
						function(index) {
							layer.closeAll();
							layer.load(2, {
								shade: [0.1, '#000']
							});
							$.get(obj.attr('href'), function(data) {
								layer.closeAll('loading');
								if (data.msg == '') {
									parent.location.href = data.url;
								} else {
									layer.msg(data.msg, {
										icon: data.code,
										time: 1500
									}, function() {
										if (data.url != '') {
											parent.location.href = data.url;
										}
									});
								}
							});
						},
						function(index, layero) {
							layer.close(index);
						});
				});

			})
		</script>
	</body>
</html>
